package com.cy.sc;

import com.cy.sc.ribbon.MyLBRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

/**
 * <br>@class: Application80
 * <br>@description: 微服务体系中的前端消费者，直面用户请求
 * <br>@author: cy
 * <br>@date: 2020-04-02 13:15:31
 * <br>@version: 1.0
 * <br>
 * <br>@since: (版本) 作者 时间 注释
 */
@EnableEurekaClient
@SpringBootApplication
//指定自定义实现LB规则
@RibbonClient(name = "CY", configuration = MyLBRule.class)
public class Application80 {
    // 本例中，采用Ribbon做负载均衡，去轮训获取对应的后端 集群式微服务业务接口
    // 流程map
    // user ==>> (this)Consumer ===ribbon==>> service-dept 集群
    // Ribbon 后续会被 Feign取代，Feign是更强大的负载均衡组件
    // Feign包含了Ribbon,具体请看 Consumer-Feign-8080
    public static void main(String[] args) {
        SpringApplication.run(Application80.class, args);
    }
}
